<template>
	<div class="group_release">

		<!-- 发布团购主页 -->
		<div class="selIndex0" v-if="selIndex===0">
			<x-header title="发布团购" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="goBacks">
				<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
			</x-header>
			<div class="content">
				<div class="upload_imgs" id="uploadImgs" @click.stop="autoClick">
					<img v-if="lenImg===0" id="showImg" src="../../assets/images/groups/upload.jpg" />
					<img v-else class="showImg2" v-for="item in imgArrs" :src="item" />
					<input type="file" multiple @change="onFileChange" style="display:none;" id="upfile">
				</div>
				<div class="sel_type">
					<group>
						<cell @click.native="goSelectType" title="品类" :value="value1" is-link value-align="left"></cell>
						<cell @click.native="goAccounts" title="收款账户" :value="value2|BankCard" is-link value-align="left"></cell>
						<cell @click.native="goStores" title="门店" :value="value3.join()" is-link value-align="left"></cell>
					</group>
					<div class="rates">
						<p>费率</p>
						<img @click.stop="showToast1=true" src="../../assets/images/groups/helps.jpg" alt="" />
						<input type="text" placeholder="" v-model.trim="input0" />
					</div>
					<!-- 费率解释 -->
					<x-dialog :hide-on-blur="true" v-model="showToast1">
						<div style="padding:15px;height:4rem;">
							<h2 style="font-size:.3rem;font-weight:400;">费率</h2>
							<p style="font-size:.28rem;color:#6C6C6C;margin-top:.3rem;text-align:left;">费率是指缴纳费用的比率。如保险业的费率指投保人向保险人交纳费用的金额与保险人承担赔偿金额的比率。也指电话在一个计费单元内收取的费用。</p>
						</div>
					</x-dialog>
					<div class="set_img0">
						<p>封面图</p>
						<img v-if="!showImgUrl0" @click="setImg0" id="showImg0" src="../../assets/images/groups/upImg.png" />
						<img v-else @click="setImg0" id="showImg0" :src="showImgUrl0" />
						<input type="file" @change="onFileChange0" style="display:none;" id="upfile0">
					</div>
					<div class="meal_names">
						<div>
							<p>套餐名称</p>
						</div>
						<input type="text" placeholder="最多填写20字" v-model.trim="input1" />
						<img v-if="!input1" src="../../assets/images/groups/write.jpg" alt="" />
					</div>
					<div class="meal_quantity">
						<div>
							<h6>用餐人数</h6>
							<h6>{{ quantity }}</h6>
						</div>
						<checker v-model="demo1" default-item-class="demo1-item" selected-item-class="demo1-item-selected">
							<checker-item value="1" @on-item-click="onItemClick">单人餐</checker-item>
							<checker-item value="2" @on-item-click="onItemClick">双人餐</checker-item>
							<checker-item value="3" @on-item-click="onItemClick">3-4人餐</checker-item>
							<checker-item value="4" @on-item-click="onItemClick">自定义</checker-item>
						</checker>
					</div>
					<div class="meal_content" v-if="totalPrice4>0">
						<group>
							<cell @click.native="goMealContent" title="套餐内容" :value="'套餐总价格￥'+totalPrice4" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="meal_content" v-else>
						<group>
							<cell @click.native="goMealContent" title="套餐内容" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="group_prices meal_names">
						<div>
							<p>团购价</p>
						</div>
						<input type="number" placeholder="请填写" v-model.trim="input2" />
						<img v-if="!input2" src="../../assets/images/groups/write.jpg" alt="" />
					</div>
					<div class="meal_type">
						<group>
							<cell @click.native="mealType" title="用餐类型" :value="value6" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="consume_time">
						<group>
							<cell @click.native="goConsumeTime" title="消费时间" :value="value7" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="end_time" v-if="value8">
						<group>
							<cell @click.native="goEndTime" title="截止日期" :value="'自上线之日起'+value8" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="end_time" v-if="!value8">
						<group>
							<cell @click.native="goEndTime" title="截止日期" :value="value8" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="delay_date">
						<group>
					      <x-switch title="到期后自动延迟30天" v-model="value9"></x-switch>
					    </group>
					</div>
					<div class="unavailable">
						<group>
							<x-switch title="不可用券日期" v-model="value10"></x-switch>
						</group>
					</div>
					<div class="unavailable_lists" v-if="value10">
						<cell v-if="value11==='全部'" @click.native="everyweek" title="" value="每周不可用" is-link value-align="left"></cell>
						<cell v-else @click.native="everyweek" title="" :value="value11.join()" is-link value-align="left"></cell>
						<cell v-if="value12==='全部'" @click.native="holiday" title="" value="节假日不可用" is-link value-align="left"></cell>
						<cell v-else @click.native="holiday" title="" :value="value12.join()" is-link value-align="left"></cell>
						<cell @click.native="appoint" title="" :value="string13" is-link value-align="left"></cell>
					</div>
					<div class="purchase_notice">
						<group>
							<cell @click.native="goPurchaseNotice" title="购买须知" is-link value-align="left"></cell>
						</group>
					</div>
					<div class="foot_button">
						<button @click="submits">提交审核</button>
					</div>
				</div>
			</div>
			<!-- 选择用餐人数 -->
			<popup-picker style="display:none;" :show.sync="shows" @on-change="onChange1" confirm-text="确定" :data="list2" v-model="value4"></popup-picker>
			<!-- 用餐类型 -->
			<popup v-model="show3" :hide-on-blur="false">
				<div class="all_types">
					<div class="all_type">
						<group>
							<radio :selected-label-style="{color: '#10b9a5'}" :options="options" v-model="value6" @on-change="change3"></radio>
						</group>
					</div>
					<div class="btn" @click="ensure3">确定</div>
				</div>
			</popup>
			<!-- 截止日期 -->
			<popup v-model="show4" :hide-on-blur="false">
				<div class="all_times">
					<div class="all_time">
						<group>
							<radio :selected-label-style="{color: '#10b9a5'}" :options="options2" v-model="value8" @on-change="change4"></radio>
						</group>
					</div>
					<div class="btn" @click="ensure4">确定</div>
				</div>
			</popup>
			<!-- 每周不可用 -->
			<popup v-model="show11" :hide-on-blur="false">
				<div class="all_times">
					<div class="all_time">
						<group>
							<checklist label-position="left" :options="options11" v-model="value11" @on-change="change11"></checklist>
						</group>
					</div>
					<div class="btn" @click="ensure11">确定</div>
				</div>
			</popup>
			<!-- 节假日不可用 -->
			<popup v-model="show12" :hide-on-blur="false">
				<div class="all_times">
					<div class="all_time">
						<group>
							<checklist label-position="left" :options="options12" v-model="value12" @on-change="change12"></checklist>
						</group>
					</div>
					<div class="btn" @click="ensure12">确定</div>
				</div>
			</popup>
		</div>

		<!-- 选择团购品类 -->
		<div class="selIndex1" v-if="selIndex===1">
			<div class="select_type">
				<x-header title="选择团购品类" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="selIndex=0">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<div class="all_class" :style="{height:H1+'rem'}">
						<div class="first_class">
							<ul v-for="(item,index) in allData">
								<li :class="{sel1:index===selIndex1_1}" @click="selFirst(index)">{{ item.name }}</li>						
							</ul>
						</div>
						<div class="second_class" v-if="allData[selIndex1_1]">
							<ul v-if="allData[selIndex1_1].son_cate.length>0" v-for="(item,index) in allData[selIndex1_1].son_cate">
								<li :class="{sel2:item.name===value1}" @click="selSecond(index)">{{ item.name }}</li>
							</ul>
							<p v-if="!allData[selIndex1_1].son_cate || allData[selIndex1_1].son_cate.length===0">该分类下暂无品类</p>
						</div>
					</div>			
				</div>
			</div>
		</div>	

		<!-- 收款账户 -->
		<div class="selIndex2" v-if="selIndex===2">
			<div class="accounts">
				<x-header title="选择账户" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="selIndex=0">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<div class="account_tab">
						<tab>
							<tab-item :selected="selectIndex2_1===0" @on-item-click="onItemClick2_1">可用账户</tab-item>
							<tab-item :selected="selectIndex2_1===1" @on-item-click="onItemClick2_1">不可用账户</tab-item>			      
						</tab>
					</div>
					<div class="content1" :class="{cons:accountData.length>2}" v-if="selectIndex2_1===0">
						<div v-if="accountData.length>0" class="data_list" v-for="item in accountData">
							<div class="names">
								<p>{{ item.store_name }}</p>
								<check-icon :value="selAccountId===item.id" @click.native="selectAccount(item.id,item.card_num)"></check-icon>
							</div>	
							<h6></h6>
							<div class="bank_name name1">
								<p>开户行：</p>
								<p>{{ item.bank_of_deposit }}</p>
							</div>
							<div class="user_name name1">
								<p>开户名：</p>
								<p>{{ item.account_name }}</p>
							</div>
							<div class="bank_card name1">
								<p>银行卡：</p>
								<p>{{ item.card_num | BankCard }}</p>
							</div>
							<div class="pay_way name1">
								<p>付款方式：</p>
								<p v-if="item.method_of_withdrawal===0">7天自提+每4周自动付</p>
								<p v-if="item.method_of_withdrawal===1">其他</p>
							</div>
						</div>
						<div v-if="noAccountData" style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#A9A9A9;">暂无数据</div>
					</div>
					<div class="content2" v-if="selectIndex2_1===1">
						<div v-if="accountData.length>0" class="data_list" v-for="item in accountData">
							<div class="names">
								<p>{{ item.store_name }}</p>
							</div>
							<h6></h6>
							<div class="bank_name name1">
								<p>开户行：</p>
								<p>{{ item.bank_of_deposit }}</p>
							</div>
							<div class="user_name name1">
								<p>开户名：</p>
								<p>{{ item.account_name }}</p>
							</div>
							<div class="bank_card name1">
								<p>银行卡：</p>
								<p>{{ item.card_num | BankCard }}</p>
							</div>
							<div class="pay_way name1">
								<p>付款方式：</p>
								<p v-if="item.method_of_withdrawal===0">7天自提+每4周自动付</p>
								<p v-if="item.method_of_withdrawal===1">其他</p>
							</div>
						</div>
						<div class="no_data" v-if="noAccountData">暂无数据</div>
					</div>
					<div class="btns2" v-if="selectIndex2_1===0">
						<button @click="addCart2">添加银行卡</button>
						<button @click="goRelease2_1">完成</button>
					</div>
				</div>
			</div>
		</div>

		<!-- 门店 -->
		<div class="selIndex3" v-if="selIndex===3">
			<div class="stores">
				<x-header title="选择门店" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="selIndex=0">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<h6>选择门店</h6>
					<div class="data_lists" v-for="item in storeData" @click="selS(item.store_id,item.storeName)">
						<check-icon :value="selStoreId.indexOf(''+item.store_id)>-1"></check-icon>
						<div class="store_info">
							<h6>{{ item.storeName }}</h6>
							<p>地址：{{ item.address }}</p>
						</div>
					</div>
					<div class="no_more">没有更多了...</div>
					<button @click="goRelease3_1">完成</button>
				</div>
			</div>
		</div>

		<!-- 套餐内容 -->
		<div class="selIndex4" v-if="selIndex===4">
			<div class="meal_content">
				<x-header title="套餐内容" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="selIndex=0">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<div class="account_tab">
						<tab>
							<tab-item :selected="selectIndex4_1===0" @on-item-click="onItemClick4_1">已选菜品</tab-item>
							<tab-item :selected="selectIndex4_1===1" @on-item-click="onItemClick4_1">我的菜品库</tab-item>
						</tab>
					</div>
					<div class="content1" v-if="selectIndex4_1===0">
						<div class="no_data" v-if="noData4_1">
							<img src="../../assets/images/groups/select_meal.jpg" alt="" />
							<img src="../../assets/images/groups/no_meal.jpg" alt="" />
						</div>
						<div class="have_datas" v-if="!noData4_1">
							<div class="single_meal">
								<p>{{ quantity }}</p>
								<div @click="userable4_1">
									<img src="../../assets/images/groups/helps.jpg" alt="" />
									<span v-if="selIndex4_0===0">全部可用</span>
									<span v-if="selIndex4_0===1">3选1可用</span>
									<span v-if="selIndex4_0===2">3选2可用</span>
									<p></p>
								</div>
							</div>
							<div class="data_lists">
								<div class="data_list" v-for="item in selFoodData">
									<p>{{ item.title }}</p>
									<p>￥{{ item.price }}</p>
									<div class="change_num">
										<img @click="minusFood(item.id)" src="../../assets/images/groups/minus.png" alt="">
										<p>{{ item.SUM }}</p>
										<img @click="plusFood(item.id)" src="../../assets/images/groups/plus.png" alt="">
									</div>
								</div>
								<div class="blank4"></div>
							</div>
							<div class="footers1">
								<p>已选菜品<span>{{ totalNum4 }}</span>种，店内原价<span>￥{{ totalPrice4 }}</span></p>
								<button @click="goRelease4_1">确定套餐</button>
							</div>
							<popup v-model="show4_2">
								<div class="all_use">
									<p @click="select4_1(0)" :class="{selects:selIndex4_0===0}">全部可用</p>
									<p @click="select4_1(1)" :class="{selects:selIndex4_0===1}">3选1可用</p>
									<p @click="select4_1(2)" :class="{selects:selIndex4_0===2}">3选2可用</p>
								</div>
							</popup>
						</div>
					</div>
					<!-- 我的菜品库 -->
					<div class="content2" v-if="selectIndex4_1===1">
						<div class="all_foods">
							<div class="first_class" :style="{height:H2+'rem'}">
								<p v-for="(item,index) in myFoodData" @click="sel_one4_1(index,item.id)" :class="{sels:index===selIndex4_1}">
									<span>{{ item.cat_name }}</span>
									<badge v-if="item.NUMS>0" :text="item.NUMS" style="position:absolute;right:.1rem;top:.12rem;"></badge>
								</p>
							</div>
							<div class="second_class" v-if="myFoodData[selIndex4_1]&&myFoodData[selIndex4_1].goodsinfo&&myFoodData[selIndex4_1].goodsinfo.length>0">
								<div class="second_lists" v-for="(item,index) in myFoodData[selIndex4_1].goodsinfo">
									<div class="food_img">
										<img :src="item.face_path_full" alt="" />
									</div>
									<div class="food_info">
										<h6>{{ item.title }}</h6>
										<p><span>￥{{ item.price }}</span>/份</p>
									</div>
									<div class="change_num">
										<img @click="minusFood(item.id)" src="../../assets/images/groups/minus.png" alt="">
										<p>{{ item.SUM }}</p>
										<img @click="plusFood(item.id)" src="../../assets/images/groups/plus.png" alt="">
									</div>
								</div>
							</div>
							<div class="no_d" v-else>该分类下暂无菜品</div>
						</div>						
						<div class="footers2">
							<p>已选菜品<span>{{ totalNum4 }}</span>种，店内原价<span>￥{{ totalPrice4 }}</span></p>
							<div>
								<button @click="handleShowAdd">新增菜品</button>
								<button @click="showSelect4_1">查看已选菜品</button>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!-- 消费时间 -->
		<div class="selIndex5" v-if="selIndex===5">
			<div class="consume_time">
				<x-header title="消费时间" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="selIndex=0">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<div class="check_list">
						<checklist :options="commonList5_1" v-model="radioValue5_1" :max="1"></checklist>
					</div>
					<div v-if="radioValue5_1[0]==='部分时间可用'" class="date_times">
						<div class="date_time" v-for="(item,index) in allData5_1">
							<div class="time_list" v-if="index===0">
								<img style="visibility:hidden;" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime v-model="value5_1" format="HH:mm"></datetime>
								<p>至</p>
								<datetime v-model="value5_2" format="HH:mm"></datetime>
							</div>
							<div class="time_list" v-if="index===1">
								<img @click="dels5_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime v-model="value5_3" format="HH:mm"></datetime>
								<p>至</p>
								<datetime v-model="value5_4" format="HH:mm"></datetime>
							</div>
							<div class="time_list" v-if="index===2">
								<img @click="dels5_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime v-model="value5_5" format="HH:mm"></datetime>
								<p>至</p>
								<datetime v-model="value5_6" format="HH:mm"></datetime>
							</div>
							<div class="time_list" v-if="index===3">
								<img @click="dels5_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime v-model="value5_7" format="HH:mm"></datetime>
								<p>至</p>
								<datetime v-model="value5_8" format="HH:mm"></datetime>
							</div>
							<div class="time_list" v-if="index===4">
								<img @click="dels5_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime v-model="value5_9" format="HH:mm"></datetime>
								<p>至</p>
								<datetime v-model="value5_10" format="HH:mm"></datetime>
							</div>
						</div>
						<div class="adds" @click="adds5_1" v-if="this.allData5_1.length<5">
							<img src="../../assets/images/groups/add.jpg" alt="" />
							<p>添加</p>
						</div>
						<div class="errors" v-if="isError5_1">
							<img src="../../assets/images/groups/error.jpg" alt="" />
							<p>可用时间有重叠，请仔细检查</p>
						</div>
					</div>
					<button @click="goRelease5_1">保存</button>
				</div>
			</div>
		</div>

		<!-- 指定日期不可用 -->
		<div class="selIndex6" v-if="selIndex===6">
			<div class="appoint_date">
				<x-header title="指定日期不可用" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="selIndex=0">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<div class="date_times">
						<div class="date_time" v-for="(item,index) in allData6_1">
							<div class="time_list" v-if="index===0">
								<img style="visibility:hidden;" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_1"></datetime>
								<p style="margin:0 .38rem;">至</p>
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_2"></datetime>
							</div>
							<div class="time_list" v-if="index===1">
								<img @click="dels6_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_3"></datetime>
								<p style="margin:0 .38rem;">至</p>
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_4"></datetime>
							</div>
							<div class="time_list" v-if="index===2">
								<img @click="dels6_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_5"></datetime>
								<p style="margin:0 .38rem;">至</p>
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_6"></datetime>
							</div>
							<div class="time_list" v-if="index===3">
								<img @click="dels6_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_7"></datetime>
								<p style="margin:0 .38rem;">至</p>
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_8"></datetime>
							</div>
							<div class="time_list" v-if="index===4">
								<img @click="dels6_1" src="../../assets/images/groups/del.jpg" alt="" />
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_9"></datetime>
								<p style="margin:0 .38rem;">至</p>
								<datetime style="border:1px solid #d8d8d8;padding:.16rem .44rem;border-radius:.05rem;" v-model="value6_10"></datetime>
							</div>
						</div>
						<div class="adds" @click="adds6_1" v-if="allData6_1.length<5">
							<img src="../../assets/images/groups/add.jpg" alt="" />
							<p>添加</p>
						</div>
						<div class="errors" v-if="isError6_1">
							<img src="../../assets/images/groups/error.jpg" alt="" />
							<p>可用日期有重叠，请仔细检查</p>
						</div>
					</div>
				</div>
				<button @click="goRelease6_1">保存</button>
			</div>
		</div>

		<!-- 购买须知 -->
		<div class="selIndex7" v-if="selIndex===7">
			<div class="purchase_notice1">
				<x-header title="购买须知" class="blues" :left-options="{backText: '',preventGoBack:true}" @on-click-back="goBack7">
					<a slot="right" style="font-size:.3rem;color:#fff;" @click="goHelp">帮助中心</a>
				</x-header>
				<div class="content">
					<div class="switchs">
						<group title=" ">
							<x-switch title="是否支持急速退" v-model="switch7_1"></x-switch>
							<x-switch title="是否支持WiFi" v-model="switch7_2"></x-switch>
							<x-switch title="是否展示发票" v-model="switch7_3"></x-switch>
							<x-switch title="支持堂食外带" v-model="switch7_4"></x-switch>
							<x-switch title="支持免费打包" v-model="switch7_5"></x-switch>
							<cell @click.native="show7_1=true" style="text-align:left;white-space:nowrap;" title="是否可享受店内其他优惠" :value="value7_1" is-link value-align="right"></cell>
						</group>
					</div>
					<div class="is_order">
						<h6>每人最多买几张</h6>
						<div class="is_order_info">
							<div style="padding:.14rem .1rem;border-bottom:1px solid #e1e1e1;">
								<span style="font-size:.29rem;color:#131313;">每人限购</span>
								<input style="border:none;width:1rem;height:.55rem;border:1px solid #cecece;font-size:.3rem;color:#131313;padding-left:.2rem;" type="number" v-model.trim="input7_4"/>
								<span style="font-size:.29rem;color:#131313;">张</span>
							</div>					
						</div>
					</div>
				</div>
				<footer>
					<button @click="save7_1">保存</button>
				</footer>
				<!-- 是否享受其他优惠 -->
				<popup v-model="show7_1" :hide-on-blur="false">
					<div class="all_types">
						<div class="all_type">
							<group>
								<radio :selected-label-style="{color: '#10b9a5'}" :options="options7_1" v-model="value7_1" @on-change="change7_1"></radio>
							</group>
						</div>
						<div class="btn" @click="ensure7_1">确定</div>
					</div>
				</popup>
				<!-- 售卖平台 -->
				<popup v-model="show7_2">
					<div class="all_types">
						<div class="all_type">
							<group>
								<radio :selected-label-style="{color: '#10b9a5'}" :options="options7_2" v-model="value7_2" @on-change="change7_2"></radio>
							</group>
						</div>
						<div class="btn" @click="ensure7_2">确定</div>
					</div>
				</popup>
			</div>
		</div>

		<!-- 新增菜品 -->
		<div class="selIndex8" v-if="selIndex===8">
			<div class="add-food">
				<div class="header vux-1px-b">
					<div class="iconfont back-icon" @click="handleClose8_1">&#xe624;</div>
					<h3>新增菜品</h3>
				</div>
				<group label-width="4.5em">
					<cell title="菜品分类" :value="value8_4" value-align="right" @click.native="showType8_1" is-link></cell>
					<x-input title="价格" :show-clear="false" type="number" v-model.trim="value8_2" placeholder="请输入价格"></x-input>
					<x-input title="原价" :show-clear="false" type="number" v-model.trim="value8_5" placeholder="请输入原价"></x-input>
					<x-input title="数量" :show-clear="false" type="number" v-model.trim="value8_3" placeholder="请输入数量"></x-input>
					<x-input title="标题" :show-clear="false" v-model.trim="value8_6" placeholder="请输入标题"></x-input>
					<x-input title="简介" :show-clear="false" v-model.trim="value8_7" placeholder="请输入简介"></x-input>
				</group>
				<div class="set_img">
					<p>图片设置</p>
					<img @click="setImg" id="showImg2" src="../../assets/images/groups/upImg.png" />
					<input type="file" @change="onFileChange2" style="display:none;" id="upfile2">
				</div>
				<div class="goods_desc" @click="goodsDesc">
					<p>商品描述</p>
					<input type="text" readonly v-model.trim="value8_8" placeholder="200字以内，请输入">
					<span></span>
				</div>
				<div class="confirm-btn">
					<button @click="add8_1">新增分类</button>
					<button @click="saves8_1">保存</button>
				</div>
			</div>
			<!-- 菜品分类列表 -->
			<popup v-model="shows8_1" position="left" width="50%">
				<div class="food_list8">
					<p v-for="item in foodTypeData" @click="sel8_1(item.id,item.cat_name)" :class="{sel:item.id===sel8Index}">{{ item.cat_name }}</p>
				</div>
			</popup>
			<!-- 新增分类 -->
			<div>
				<confirm v-model="shows8_2" show-input ref="confirm8_2" title="请输入菜品分类" @on-confirm="onConfirm8_2"></confirm>
			</div>
		</div>

		<!-- 商品描述 -->
		<div class="selIndex9" v-if="selIndex===9">
			<div class="header vux-1px-b">
				<div class="iconfont back-icon" @click="handleClose9_1">&#xe624;</div>
				<h3>商品描述</h3>
			</div>
			<group>
				<x-textarea v-model="value9_1" :max="200" :autosize="true" placeholder="介绍一下你的产品吧，200个字以内就可以哦"></x-textarea>
			</group>
			<div class="btns9">
				<button @click="value9_1=''">清空</button>
				<button @click="save9">保存</button>
			</div>
		</div>

		<!-- 添加银行卡 -->
		<div class="selIndex10" v-if="selIndex===10">
			<div class="header vux-1px-b">
				<div class="iconfont back-icon" @click="handleClose10_1">&#xe624;</div>
				<h3>添加银行卡</h3>
			</div>
			<div class="add_cards">
				<group label-width="4.5em">
					<x-input title="开户银行" :show-clear="false" v-model.trim="value10_1" placeholder="请输入开户银行"></x-input>
					<x-input title="开户姓名" :show-clear="false" v-model.trim="value10_2" placeholder="请输入开户姓名"></x-input>
					<x-input title="银行卡号" :show-clear="false" v-model.trim="value10_3" placeholder="请输入银行卡"></x-input>
					<cell title="所属分店" :value="value10_4" value-align="right" @click.native="showType10_1" is-link></cell>
					<cell title="付款方式" :value="value10_5" value-align="right" @click.native="showType10_2" is-link></cell>
				</group>
				<div class="sel_stores">
					<popup v-model="shows10_1" position="left" width="50%">
						<div class="store_list10">
							<p v-for="item in storeData10" :class="{sel:selStoreId10===item.store_id}" @click="selStore10(item.store_id,item.storeName)">{{ item.storeName }}</p>
						</div>
					</popup>
				</div>
				<div class="pay_ways">
					<popup v-model="shows10_2" position="left" width="50%">
						<div class="way_list10">
							<p v-for="item in storeData10_2" :class="{sel:selStoreId10_2===item.id}" @click="selStore10_2(item.id,item.way)">{{ item.way }}</p>
						</div>
					</popup>
				</div>
			</div>
			<div class="btns10">
				<button @click="save10">保存</button>
			</div>
		</div>

	</div>
</template>

<script>
	import { setCookie, getCookie, removeCookie, clearCookie } from '@/assets/js/cookie'
	import { XHeader, Datetime, Group, XButton, Alert, Popup, XInput, Checker, CheckerItem, Picker, Cell, PopupPicker, Radio, XSwitch, CheckIcon, Tab, TabItem, XNumber, Checklist, Confirm, XTextarea, Badge, PopupRadio, XDialog, Loading } from 'vux';
	import { getUrlParam } from '@/assets/js/getUrlParam'
	import $ from 'jquery'
	export default {
		name: 'group_release',
		data() {
			let arr = [];
			for(let i = 1;i <= 12;i++){
				arr.push(i + '个月');
			}
			let arr2 = [];
			arr2.push('元旦');
			arr2.push('情人节');
			arr2.push('春节');
			arr2.push('元宵节');
			arr2.push('清明节');
			arr2.push('中秋节');
			arr2.push('国庆节');
			arr2.push('重阳节');
			arr2.push('万圣节');
			arr2.push('感恩节');
			arr2.push('圣诞节');
			return {
				flag0: true, //防止重复提交
				selIndex: 0,
				imgArrs: [], //上传图片绝对路径集合
				lenImg: 0, //几张图片
				H1: 0,
				H2: 0,
				value1: '', //品类
				value1_id: 0, //品类id
				value2: '', //收款账户
				accountData: [], //收款账户所有数据
				noAccountData: false,
				selAccountId: 0, //选中的收款账户id
				storeData: [], //门店所有数据
				selStoreId: [], //选中的门店id集合
				value3: [], //门店名字集合
				input0: '', //费率
				showToast1: false,
				showToast2: false,
				input1: '', //套餐名称
				demo1: '1', //用餐数量
				quantity: '单人餐', //用餐文字
				flags: false,
				value4: [], //选择的用餐人数
				list2: [
				['1人', '2人', '3人', '4人', '5人', '6人', '7人', '8人', '9人'],
				['至'],
				['1人', '2人', '3人', '4人', '5人', '6人', '7人', '8人', '9人', '10人']
				],
				shows: false,
				selIndex1_1: 0, //选中的一级分类索引
				selIndex1_2: 0, //选中的二级分类索引
				selValue: '', //选择的值
				allData: [], //品类
				selectIndex2_1: 0, //0-可用账户  1-不可用账户
				value5: '', //套餐内容
				selectIndex4_1: 0, //0-已选菜品  1-我的菜品库
				selFoodData: [], //已选菜品
				myFoodData: [], //我的菜品库
				value4_1: 1,
				value4_2: 1,
				value4_3: 1,
				show4_2: false,
				selIndex4_0: 0, //0-全部可用  1-3选1可用  2-3选2可用
				selIndex4_1: 0, // 索引
				selFoodPid: 0, //选中的食物父id
				selIndex4_2: 0, //二级分类
				selNum4_1: 0,
				value4_1: 0,
				nums4_1: 0,
				input2: '', //团购价
				value6: '', //用餐类型
				value_6: '',
				show3: false, //是否显示用餐类型
				options: ['早餐', '午餐', '晚餐', '下午茶', '夜宵'],
				value7: '24小时可用', //消费时间
				commonList5_1: ['24小时可用', '部分时间可用'],
				radioValue5_1: ['24小时可用'],
				allData5_1: [1],
				value5_1: '09:00',
				value5_2: '10:00',
				value5_3: '00:00',
				value5_4: '00:00',
				value5_5: '00:00',
				value5_6: '00:00',
				value5_7: '00:00',
				value5_8: '00:00',
				value5_9: '00:00',
				value5_10: '00:00',
				value8: '', //截止日期
				value_8: '',
				show4: false, //是否显示截止日期
				options2: arr,
				value9: true, //是否打开延期30天
				value10: true, //是否打开不可用券日期
				value11: ['每周不可用'], //每周不可用
				value_11: [],
				value12: ['节假日不可用'], //节假日不可用
				value_12: [],
				value13: ['指定日期不可用'], //指定日期不可用
				string13: '指定日期不可用', //指定日期不可用文字
				show11: false, //是否显示每周不可用
				show12: false, //是否显示节假日不可用
				options11: ['周一','周二','周三','周四','周五','周六','周日'],
				options12: arr2,
				allData6_1: [1],
				value6_1: '',
				value6_2: '',
				value6_3: '',
				value6_4: '',
				value6_5: '',
				value6_6: '',
				value6_7: '',
				value6_8: '',
				value6_9: '',
				value6_10: '',
				//购买须知
				switch7_1: true,
				switch7_2: true,
				switch7_3: true,
				switch7_4: true,
				switch7_5: true,
				value7_1: '可以同时享有',
				value7_1_1: '',
				show7_1: false, //是否显示其他优惠
				demo7_1: true,
				demo7_2: false,
				options7_1: ['不可以同时享有','可以同时享有'],				
				input7_1: '' ,//其他
				show7_2: false, //是否显示售卖平台
				value7_2: '美团+点评',
				value7_2_2: '',
				options7_2: ['美团','点评','美团+点评'],
				demo7_3: true,
				demo7_4: false,
				input7_2: '', //美团张数
				demo7_5: true,
				demo7_6: false,
				input7_3: '', //点评张数
				demo7_7: true,
				demo7_8: false,
				input7_4: 100, //每人最多买几张
				demo7_9: true,
				demo7_10: false,
				input7_5: '', //每人每次最多买几张
				demo7_11: true,
				demo7_12: false,
				input7_6: '', //限用多少人
				input7_7: '', //身高多少米
				addNewFood : '', //控制新增菜品的显示
				value8_1: '', //菜品名
				value8_2: '', //价格
				value8_3: '', //数量
				value8_4: '', //分类
				value8_5: '', //原价
				value8_6: '', //标题
				value8_7: '', //简介
				value8_8: '', //描述
				showImgUrl: '', //图片路径
				showImgUrl0: '', //封面图路径
				switch8_1: true,
				shows8_1: false,
				foodTypeData: [], //菜品分类数据
				sel8Index: 0, //选中的菜品分类id
				shows8_2: false,
				value9_1: '', //商品描述
				value10_1: '', //开户银行
				value10_2: '', //开户姓名
				value10_3: '', //银行卡号
				value10_4: '', //所属分店
				value10_5: '', //付款方式
				shows10_1: false,
				shows10_2: false,
				storeData10: [],
				selStoreId10: 0,
				storeData10_2: [{id:0,way:'7天自提+每4周自动付'},{id:1,way:'其他'}],
				selStoreId10_2: -1,
				flagg10: true,
			}
		},
		components: {
			XHeader,
			Datetime,
			Group,
			XButton,
			Alert,
			Popup,
			XInput,
			Checker,
			CheckerItem,
			Picker,
			Cell,
			PopupPicker,
			Radio,
			XSwitch,
			CheckIcon,
			Tab,
			TabItem,
			XNumber,
			Checklist,
			Confirm,
			XTextarea,
			Badge,
			PopupRadio,
			XDialog,
			Loading
		},
		computed: {
			price4_1() {
				if(!this.value4_1) {
					return 0;
				}
				return this.value4_1 * 12;
			},
			price4_2() {
				if(!this.value4_2) {
					return 0;
				}
				return this.value4_2 * 17;
			},
			price4_3() {
				if(!this.value4_3) {
					return 0;
				}
				return this.value4_3 * 17;
			},
			noData4_1(){
				if(this.selFoodData.length > 0){
					return false;
				}else{
					return true;
				}
			},
			//菜品类别总数
			totalNum4(){
				let num = 0;
				this.selFoodData.forEach((i,v)=>{
					//num += i.SUM;
					num = v+1;
				})
				return num;
			},
			//菜品总价格
			totalPrice4(){
				let price = 0;
				let num = 0;
				this.selFoodData.forEach((i,v)=>{
					price += +i.price * i.SUM;
				})
				return price.toFixed(2);
			},
			//时间是否有交叉
			isError5_1(){
				if(this.allData5_1.length === 1){
					if(this.hourMinute(this.value5_2)>this.hourMinute(this.value5_1)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData5_1.length === 2){
					if(this.hourMinute(this.value5_2)>this.hourMinute(this.value5_1)
						&&this.hourMinute(this.value5_3)>=this.hourMinute(this.value5_2)
						&&this.hourMinute(this.value5_4)>this.hourMinute(this.value5_3)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData5_1.length === 3){
					if(this.hourMinute(this.value5_2)>this.hourMinute(this.value5_1)
						&&this.hourMinute(this.value5_3)>=this.hourMinute(this.value5_2)
						&&this.hourMinute(this.value5_4)>this.hourMinute(this.value5_3)
						&&this.hourMinute(this.value5_5)>=this.hourMinute(this.value5_4)
						&&this.hourMinute(this.value5_6)>this.hourMinute(this.value5_5)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData5_1.length === 4){
					if(this.hourMinute(this.value5_2)>this.hourMinute(this.value5_1)
						&&this.hourMinute(this.value5_3)>=this.hourMinute(this.value5_2)
						&&this.hourMinute(this.value5_4)>this.hourMinute(this.value5_3)
						&&this.hourMinute(this.value5_5)>=this.hourMinute(this.value5_4)
						&&this.hourMinute(this.value5_6)>this.hourMinute(this.value5_5)
						&&this.hourMinute(this.value5_7)>=this.hourMinute(this.value5_6)
						&&this.hourMinute(this.value5_8)>this.hourMinute(this.value5_7)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData5_1.length === 5){
					if(this.hourMinute(this.value5_2)>this.hourMinute(this.value5_1)
						&&this.hourMinute(this.value5_3)>=this.hourMinute(this.value5_2)
						&&this.hourMinute(this.value5_4)>this.hourMinute(this.value5_3)
						&&this.hourMinute(this.value5_5)>=this.hourMinute(this.value5_4)
						&&this.hourMinute(this.value5_6)>this.hourMinute(this.value5_5)
						&&this.hourMinute(this.value5_7)>=this.hourMinute(this.value5_6)
						&&this.hourMinute(this.value5_8)>this.hourMinute(this.value5_7)
						&&this.hourMinute(this.value5_9)>=this.hourMinute(this.value5_8)
						&&this.hourMinute(this.value5_10)>this.hourMinute(this.value5_9)){
						return false;
					}else{
						return true;
					}
				}
			},
			//日期是否有交叉
			isError6_1(){
				if(this.allData6_1.length === 1){
					if(this.dateCompare(this.value6_2)>this.dateCompare(this.value6_1)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData6_1.length === 2){
					if(this.dateCompare(this.value6_2)>this.dateCompare(this.value6_1)
						&&this.dateCompare(this.value6_3)>=this.dateCompare(this.value6_2)
						&&this.dateCompare(this.value6_4)>this.dateCompare(this.value6_3)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData6_1.length === 3){
					if(this.dateCompare(this.value6_2)>this.dateCompare(this.value6_1)
						&&this.dateCompare(this.value6_3)>=this.dateCompare(this.value6_2)
						&&this.dateCompare(this.value6_4)>this.dateCompare(this.value6_3)
						&&this.dateCompare(this.value6_5)>=this.dateCompare(this.value6_4)
						&&this.dateCompare(this.value6_6)>this.dateCompare(this.value6_5)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData6_1.length === 4){
					if(this.dateCompare(this.value6_2)>this.dateCompare(this.value6_1)
						&&this.dateCompare(this.value6_3)>=this.dateCompare(this.value6_2)
						&&this.dateCompare(this.value6_4)>this.dateCompare(this.value6_3)
						&&this.dateCompare(this.value6_5)>=this.dateCompare(this.value6_4)
						&&this.dateCompare(this.value6_6)>this.dateCompare(this.value6_5)
						&&this.dateCompare(this.value6_7)>=this.dateCompare(this.value6_6)
						&&this.dateCompare(this.value6_8)>this.dateCompare(this.value6_7)){
						return false;
					}else{
						return true;
					}
				}
				if(this.allData6_1.length === 5){
					if(this.dateCompare(this.value6_2)>this.dateCompare(this.value6_1)
						&&this.dateCompare(this.value6_3)>=this.dateCompare(this.value6_2)
						&&this.dateCompare(this.value6_4)>this.dateCompare(this.value6_3)
						&&this.dateCompare(this.value6_5)>=this.dateCompare(this.value6_4)
						&&this.dateCompare(this.value6_6)>this.dateCompare(this.value6_5)
						&&this.dateCompare(this.value6_7)>=this.dateCompare(this.value6_6)
						&&this.dateCompare(this.value6_8)>this.dateCompare(this.value6_7)
						&&this.dateCompare(this.value6_9)>=this.dateCompare(this.value6_8)
						&&this.dateCompare(this.value6_10)>this.dateCompare(this.value6_9)){
						return false;
					}else{
						return true;
					}
				}
			},
			//用餐类型
			mealTypes(){
				if(this.value6 === '早餐'){
					return 1;
				}else if(this.value6 === '午餐'){
					return 2;
				}else if(this.value6 === '晚餐'){
					return 3;
				}else if(this.value6 === '下午茶'){
					return 4;
				}else if(this.value6 === '夜宵'){
					return 5;
				}else{
					return 0;
				}
			},
			//是否支持其他优惠
			otherDiscount(){
				if(this.value7_1 === '可以同时享有'){
					return 1;
				}else{
					return 0;
				}
			},
		},
		mounted () {
			if(getUrlParam('uid')){
				setCookie('uid',getUrlParam('uid'),30)
			}
			if(getUrlParam('user_product_id')){
				setCookie('user_product_id',getUrlParam('user_product_id'),30)
			}
			if(getUrlParam('token')){
				setCookie('token',getUrlParam('token'),30)
			}
		},
		watch: {
			input7_4: {
				handler(val){
					if(val >= 100){
						this.input7_4 = 100;
					}
				},
				deep: true
			}
		},
		created() {
			var H = document.body.clientHeight || document.documentElement.clientHeight;
			this.H1 = (H-40)*2/100;
			this.H2 = (H-84-85)*2/100;
			let dd = new Date();
			this.value6_1 = this.value6_3 = this.value6_5 = this.value6_7 = this.value6_9 = this.formats(dd.getTime());
			let dd2 = new Date();
			dd2.setDate(dd2.getDate() + 7);
			this.value6_2 = this.value6_4 = this.value6_6 = this.value6_8 = this.value6_10 = this.formats(dd2.getTime());
		},
		methods: {
			//品类
			category(){
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					}
				};
				this.$axiosGet('/api/group/catTree',obj).then(res => {
					if(res.code === 200){
						this.allData = res.data;
					}
				})
			},
			//收款账户
			getAccount(){
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					store_id: getCookie('user_product_id'),
					type: this.selectIndex2_1
				};
				this.$axiosPost('/api/group/selectaccount',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.accountData = res.data;
						if(this.accountData.length === 0){
							setTimeout(()=>{
								this.noAccountData = true
							},1500);
						}
					}
				})
			},
			//选中收款账户
			selectAccount(id,cardId){
				this.selAccountId = id;
				this.value2 = cardId;
			},
			//切换
			onItemClick2_1(val) {
				this.selectIndex2_1 = val;
				this.accountData = [];
				this.getAccount();
			},
			//添加银行卡
			addCart2(){
				this.selIndex = 10;
				this.flagg10 = true;
			},
			//选择账户完成
			goRelease2_1(){
				if(this.selAccountId === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择账户'
					});
					return;
				}
				this.selIndex = 0;
				//console.log(this.selAccountId);
			},
			//显示新增菜品
			handleShowAdd(){
				this.selIndex = 8;
			},
			//返回
			goBacks(){
				let self = this;
				this.$vux.confirm.show({
					content: '团购发布还未保存，是否确定退出?',
					confirmText: '退出',
					onConfirm() {
						self.$router.go(-1);
					}
				})
			},
			//帮助中心
			goHelp() {
				let self = this;
				this.$vux.confirm.show({
					content: '前往帮助中心，是否确定退出?',
					confirmText: '退出',
					onConfirm() {
						self.$router.push('/customerService');
					}
				})				
			},
			//自动点击
			autoClick() {				
				document.getElementById("upfile").click();				
				document.getElementById("upfile").click();				
			},			
			//上传文件
			onFileChange($event) {										
				this.lenImg += $event.target.files.length;
				let self = this;
				if(this.lenImg === 0) {
					return;
				}
				if(this.lenImg > 5){
					this.$vux.alert.show({
						title: '提示',
						content: '最多上传5张图片'
					})
					var ps = document.getElementById('uploadImgs').getElementsByClassName('showImg2');
				    for(let i=0;i<ps.length;i++){
				        ps[i].style.display = 'none';
				    }							
				    this.lenImg = 0;
				    this.imgArrs = [];
					return;
				}								
				let fileArr = $event.target.files;
				if($event.target.files.length>0){
					this.$vux.loading.show({
						text: '上传中'
					});
				}
				for(var i=0;i<fileArr.length;i++){
		            var file=fileArr[i];	
		            var reader = new FileReader();				                       		                       
		            reader.onload = function (e) {
			            self.$axiosPostno('/utils/files/uploadbase64.json',{
				            upload: e.target.result
			            }).then(res => {
		            		if(res.code === 200){
					            self.imgArrs.push(res.data.fullpath);
						            self.$vux.loading.hide();
		            			//console.log(self.imgArrs);
				            }
			            })
		            }		            
		            reader.readAsDataURL(file);
		        }
			},			
			//选择团购品类
			goSelectType() {
				this.selIndex = 1;
				this.category();
			},
			//收款账户
			goAccounts() {
				this.selIndex = 2;
				this.accountData = [];
				this.getAccount();
			},
			//门店
			goStores() {
				this.selIndex = 3;
				this.selStore();
			},
			//选择门店
			selStore(){
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					}
				};
				this.$axiosGet('/api/group/selectstore',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.storeData = res.data;
					}
				});
			},
			//选中门店
			selS(id,name){
				let str = '';
				let str2 = '';
				str += id;
				str2 += name;
				if(this.selStoreId.indexOf(''+id) > -1){
					this.selStoreId.splice(this.selStoreId.indexOf(''+id),1);
				}else{
					this.selStoreId.push(str);
				}
				if(this.value3.indexOf(''+name) > -1){
					this.value3.splice(this.value3.indexOf(''+name),1);
				}else{
					this.value3.push(str2);
				}
				this.selStoreId = [...new Set(this.selStoreId)];
				this.value3 = [...new Set(this.value3)];
				//console.log(this.selStoreId);
				//console.log(this.value3);
			},
			//选择一级分类
			selFirst(id) {
				this.selIndex1_1 = id;
			},
			//选择二级分类
			selSecond(id) {
				this.selIndex1_2 = +id;
				if(this.allData[this.selIndex1_1].son_cate.length > 0){
					let val = this.allData[this.selIndex1_1].son_cate[this.selIndex1_2];
					this.value1 = val.name;
					this.value1_id = val.id;
				}
				this.selIndex = 0;
				//console.log(this.value1_id);
			},
			//门店完成
			goRelease3_1(){
				if(this.selStoreId === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择门店'
					})
					return false;
				}
				this.selIndex = 0;
			},
			//切换用餐人数
			onItemClick(value) {
				switch(value) {
					case '1':
					this.flags = false;
					this.quantity = this.quantity === '单人餐' ? '' : '单人餐';
					break;
					case '2':
					this.flags = false;
					this.quantity = this.quantity === '双人餐' ? '' : '双人餐';
					break;
					case '3':
					this.flags = false;
					this.quantity = this.quantity === '3-4人餐' ? '' : '3-4人餐';
					break;
					case '4':
					this.flags = !this.flags;
					if(this.flags) {
						this.shows = true;
					} else {
						this.quantity = '';
						this.shows = false;
					}
					break;
				}
			},
			//选择自定义人数
			onChange1() {
				this.quantity = this.value4[0].slice(0, this.value4[0].length - 1) + '-' + this.value4[2].slice(0, this.value4[2].length - 1) + '人餐';
			},
			//套餐内容
			goMealContent() {
				this.selIndex = 4;
				if(this.myFoodData.length > 0){
					return false;
				}
				this.getMyGoods();
			},
			//切换
			onItemClick4_1(val) {
				this.selectIndex4_1 = val;
				if(this.selectIndex4_1 === 1){
					if(this.myFoodData.length > 0){
						return false;
					}
					this.getMyGoods();
				}
			},
			getMyGoods(){
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					user_product_id: getUrlParam('user_product_id') || ''
				};
				this.$axiosGet('/api/group/showmygoods',{data: JSON.stringify(obj)}).then(res => {
					if(res.code === 200){
						this.myFoodData = res.data;
						this.selFoodPid = res.data[0].id;
						this.myFoodData.forEach((i,v)=>{
							i.goodsinfo.forEach((ii,vv)=>{
								this.$set(ii,'SUM',0);
							})
						})
					}
				})
			},
			userable4_1() {
				this.show4_2 = true;
			},
			select4_1(val) {
				this.selIndex4_0 = +val;
				setTimeout(() => {
					this.show4_2 = false;
				}, 200);
			},
			//选择一级分类
			sel_one4_1(id,pid) {
				this.selIndex4_1 = id;
				this.selFoodPid = pid;
			},
			showSelect4_1(){
				this.selectIndex4_1 = 0;
			},
			//食物减一
			minusFood(id){
				let nums = 0;
				this.myFoodData.forEach((i,v)=>{
					i.goodsinfo.forEach((ii,vv)=>{
						if(ii.id === id){
							let oSum = ii.SUM;
							if(oSum <= 0){
								oSum = 0;
							}else{
								oSum--;
							}
							this.$set(ii,'SUM',oSum);
						}
					})
				})
				this.myFoodData.forEach((i,v)=>{
					if(i.id === this.selFoodPid){
						i.goodsinfo.forEach((i2,v2)=>{
							nums += i2.SUM;
						})
						this.$set(i,'NUMS',nums);
					}
					i.goodsinfo.forEach((ii,vv)=>{
						if(ii.SUM > 0){
							this.selFoodData.push(ii);
						}
					})
				})
				this.selFoodData = [...new Set(this.selFoodData)];
				this.selFoodData.forEach((i,v)=>{
					if(i.SUM <= 0){
						this.selFoodData.splice(v,1);
					}
				})
			},
			//食物加一
			plusFood(id){
				let nums = 0;
				this.myFoodData.forEach((i,v)=>{
					i.goodsinfo.forEach((ii,vv)=>{
						if(ii.id === id){
							let oSum = ii.SUM;
							oSum++;
							this.$set(ii,'SUM',oSum);
						}
					})
				})
				this.myFoodData.forEach((i,v)=>{
					if(i.id === this.selFoodPid){
						i.goodsinfo.forEach((i2,v2)=>{
							nums += i2.SUM;
						})
						this.$set(i,'NUMS',nums);
					}
					i.goodsinfo.forEach((ii,vv)=>{
						if(ii.SUM > 0){
							this.selFoodData.push(ii);
						}
					})
				})
				this.selFoodData = [...new Set(this.selFoodData)];
				//console.log(this.selFoodData);
				//console.log(this.myFoodData);
			},
			//套餐内容确认套餐
			goRelease4_1(){
				//selIndex4_0 单人餐全部可用还是3选1
				this.selIndex = 0;							
			},
			//用餐类型
			mealType() {
				this.show3 = true;
			},
			//选择用餐类型
			change3(value) {
				this.value_6 = value;
			},
			//确定
			ensure3() {
				this.value6 = this.value_6;
				this.show3 = false;
			},
			//消费时间
			goConsumeTime() {
				this.selIndex = 5;
			},			
			dels5_1() {
				this.allData5_1.pop();
			},
			adds5_1() {
				if(this.allData5_1.length >= 5){
					return false;
				}
				this.allData5_1.push(1);
			},
			//消费时间保存
			goRelease5_1(){
				this.value7 = this.radioValue5_1[0];
				var str = '';
				var arr = [];
				if(this.radioValue5_1[0] === '部分时间可用'){
					if(this.isError5_1){
						this.$vux.alert.show({
							title: '提示',
							content: '可用时间有重叠，请仔细检查'
						})
						return;
					}
					if(this.allData5_1.length === 1){
						arr.push(this.value5_1,'-',this.value5_2);
					}
					if(this.allData5_1.length === 2){
						arr.push(this.value5_1,'-',this.value5_2,',',this.value5_3,'-',this.value5_4);
					}
					if(this.allData5_1.length === 3){
						arr.push(this.value5_1,'-',this.value5_2,',',this.value5_3,'-',this.value5_4,',',this.value5_5,'-',this.value5_6);
					}
					if(this.allData5_1.length === 4){
						arr.push(this.value5_1,'-',this.value5_2,',',this.value5_3,'-',this.value5_4,',',this.value5_5,'-',this.value5_6,',',this.value5_7,'-',this.value5_8);
					}
					if(this.allData5_1.length === 5){
						arr.push(this.value5_1,'-',this.value5_2,',',this.value5_3,'-',this.value5_4,',',this.value5_5,'-',this.value5_6,',',this.value5_7,'-',this.value5_8,',',this.value5_9,'-',this.value5_10);
					}
					//console.log(arr);return;
					this.value7 = arr.join('');
				}
				this.selIndex = 0;
			},
			//截止日期
			goEndTime() {
				this.show4 = true;
			},
			//选择截止日期
			change4(value) {
				this.value_8 = value;
			},
			//确定
			ensure4() {
				this.value8 = this.value_8;
				this.show4 = false;
			},
			//每周不可用
			everyweek(){
				this.show11 = true;
			},
			//节假日不可用
			holiday(){			
				this.show12 = true;
			},	
			//指定日期不可用
			appoint(){
				this.selIndex = 6;
			},
			change11(value){
				this.value_11 = value;
			},
			change12(value){
				this.value_12 = value;
			},
			ensure11() {
				this.value11 = this.value_11;
				if(this.value11.length > 1){
					this.value11.forEach((i,v)=>{
						if(i === '每周不可用'){
							this.value11.splice(v,1);
						}
					});
				}
				this.show11 = false;
			},
			ensure12() {
				this.value12 = this.value_12;
				if(this.value12.length > 1){
					this.value12.forEach((i,v)=>{
						if(i === '节假日不可用'){
							this.value12.splice(v,1);
						}
					});
				}
				this.show12 = false;
			},
			dels6_1() {
				this.allData6_1.pop();
			},
			adds6_1() {
				if(this.allData6_1.length>=5){
					return false;
				}
				this.allData6_1.push(1);
			},			
			//指定日期不可用保存
			goRelease6_1(){
				if(this.isError6_1){
					this.$vux.alert.show({
						title: '提示',
						content: '可用日期有重叠，请仔细检查'
					})
					return;
				}
				let arr = [];
				let str = '';
				if(this.allData6_1.length === 1){
					let obj1 = {};
					obj1.exclude_begin_date = this.value6_1;
					obj1.exclude_end_date = this.value6_2;
					arr.push(obj1);
					str += this.value6_1 + ',' + this.value6_2;
				}
				if(this.allData6_1.length === 2){
					let obj1 = {};
					let obj2 = {};
					obj1.exclude_begin_date = this.value6_1;
					obj1.exclude_end_date = this.value6_2;
					obj2.exclude_begin_date = this.value6_3;
					obj2.exclude_end_date = this.value6_4;
					arr.push(obj1,obj2);
					str += this.value6_1+','+this.value6_2;
					str += ' '+this.value6_3+','+this.value6_4;
				}
				if(this.allData6_1.length === 3){
					let obj1 = {};
					let obj2 = {};
					let obj3 = {};
					obj1.exclude_begin_date = this.value6_1;
					obj1.exclude_end_date = this.value6_2;
					obj2.exclude_begin_date = this.value6_3;
					obj2.exclude_end_date = this.value6_4;
					obj3.exclude_begin_date = this.value6_5;
					obj3.exclude_end_date = this.value6_6;
					arr.push(obj1,obj2,obj3);
					str += this.value6_1+','+this.value6_2;
					str += ' '+this.value6_3+','+this.value6_4;
					str += ' '+this.value6_5+','+this.value6_6;
				}
				if(this.allData6_1.length === 4){
					let obj1 = {};
					let obj2 = {};
					let obj3 = {};
					let obj4 = {};
					obj1.exclude_begin_date = this.value6_1;
					obj1.exclude_end_date = this.value6_2;
					obj2.exclude_begin_date = this.value6_3;
					obj2.exclude_end_date = this.value6_4;
					obj3.exclude_begin_date = this.value6_5;
					obj3.exclude_end_date = this.value6_6;
					obj4.exclude_begin_date = this.value6_7;
					obj4.exclude_end_date = this.value6_8;
					arr.push(obj1,obj2,obj3,obj4);
					str += this.value6_1+','+this.value6_2;
					str += ' '+this.value6_3+','+this.value6_4;
					str += ' '+this.value6_5+','+this.value6_6;
					str += ' '+this.value6_7+','+this.value6_8;
				}
				if(this.allData6_1.length === 5){
					let obj1 = {};
					let obj2 = {};
					let obj3 = {};
					let obj4 = {};
					let obj5 = {};
					obj1.exclude_begin_date = this.value6_1;
					obj1.exclude_end_date = this.value6_2;
					obj2.exclude_begin_date = this.value6_3;
					obj2.exclude_end_date = this.value6_4;
					obj3.exclude_begin_date = this.value6_5;
					obj3.exclude_end_date = this.value6_6;
					obj4.exclude_begin_date = this.value6_7;
					obj4.exclude_end_date = this.value6_8;
					obj5.exclude_begin_date = this.value6_9;
					obj6.exclude_end_date = this.value6_10;
					arr.push(obj1,obj2,obj3,obj4,obj5);
					str += this.value6_1+','+this.value6_2;
					str += ' '+this.value6_3+','+this.value6_4;
					str += ' '+this.value6_5+','+this.value6_6;
					str += ' '+this.value6_7+','+this.value6_8;
					str += ' '+this.value6_9+','+this.value6_10;
				}
				this.value13 = arr;
				this.string13 = str;
				//console.log(str);return;
				this.selIndex = 0;				
			},
			//购买须知
			goPurchaseNotice(){
				this.selIndex = 7;
			},
			//提交审核
			submits(){
				if(!this.flag0){
					return;
				}
				if(this.imgArrs.length === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请上传图片'
					})
					return;
				}
				if(this.value1_id === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择品类'
					})
					return;
				}
				if(this.selAccountId === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择收款账户'
					});
					return;
				}
				if(this.selStoreId.length === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择门店'
					});
					return;
				}
				if(this.showImgUrl0 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请上传封面图'
					})
					return;
				}
				if(this.input1 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入套餐名称'
					});
					return;
				}
				if(this.selFoodData.length === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择套餐内容'
					});
					return;
				}
				if(this.input2 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入团购价'
					});
					return;
				}
				if(this.mealTypes === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择用餐类型'
					});
					return;
				}
				if(this.value8 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择截止日期'
					});
					return;
				}
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					user_product_id: getUrlParam('user_product_id') || '',
					pics: this.imgArrs,
					title: this.input1, //团购标题
					number_of_meals: this.quantity, //用餐人数
					price: +this.input2, //团购价
					meals_type	: this.mealTypes, //用餐类型
					use_time	: this.value7, //消费时间
					end_date: +this.value8.split('个')[0], //截止日期
					is_delay: this.value9 ? 1 : 0, //是否顺延一个月 默认1
					can_refund_anytime: this.switch7_1 ? 1 : 0, //是否支持随时退款 默认1 支持
					is_support_wifi: this.switch7_2 ? 1 : 0, //是否支持wifi 默认1 支持
					is_support_invoice: this.switch7_3 ? 1 : 0, //是否支持发票 默认1 支持
					is_takeout: this.switch7_4 ? 1 : 0, //是否支持堂食外带 默认1支持
					is_free_pack: this.switch7_5 ? 1 : 0, //是否支持免费打包 默认1 支持
					is_support_other_discount: this.otherDiscount, //是否可享受店铺其他优惠
					max_buy: this.input7_4, //每人最大购买量 默认100，取值 1-100
					cat_id: this.value1_id, //品类id
					bank_account_id: this.selAccountId, //银行卡账户id
					food_content: this.selFoodData, //套餐内容
					store_selected: this.selStoreId, //门店id
					face_path: this.showImgUrl0, //封面图
					original_price: this.totalPrice4, //菜品总价格即原价
				};
				if(!this.value10){
					obj.exclude_date = [[],[],[]];
				}else{
					let arrs = [];
					if(this.value11[0] === '每周不可用'){
						arrs.push([]);
					}else{
						arrs.push(this.value11);
					}
					if(this.value12[0] === '节假日不可用'){
						arrs.push([]);
					}else{
						arrs.push(this.value12);
					}
					if(this.value13[0] === '指定日期不可用'){
						arrs.push([]);
					}else{
						arrs.push(this.value13);
					}
					obj.exclude_date = arrs;
				}
				//console.log(obj.exclude_date);return;
				this.$axiosPost('/api/group/releaseGroup',{
					data: JSON.stringify(obj)
				}).then(res => {
					this.flag0 = false;
					if(res.code === 200){
						this.flag0 = true;
						this.$vux.toast.show({
							text: '操作成功',
						});
						setTimeout(()=>{
							this.$router.go(-1)
						},1500);
					}
				})
			},
			/* 购买须知 */
			change7_1(value) {
				this.value7_1_1 = value;
			},
			ensure7_1() {
				this.value7_1 = this.value7_1_1;
				this.show7_1 = false;
			},
			sel7_1(){
				this.demo7_1 ? this.demo7_2=false : this.demo7_2=true;
			},
			sel7_2(){
				this.demo7_2 ? this.demo7_1=false : this.demo7_1=true;
			},
			change7_2(value) {
				this.value7_2_2 = value;
			},
			ensure7_2() {
				this.value7_2 = this.value7_2_2;
				this.show7_2 = false;
			},
			sel7_3(){
				this.demo7_3 ? this.demo7_4=false : this.demo7_4=true;
			},
			sel7_4(){
				this.demo7_4 ? this.demo7_3=false : this.demo7_3=true;
			},
			sel7_5(){
				this.demo7_5 ? this.demo7_6=false : this.demo7_6=true;
			},
			sel7_6(){
				this.demo7_6 ? this.demo7_5=false : this.demo7_5=true;
			},
			sel7_7(){
				this.demo7_7 ? this.demo7_8=false : this.demo7_8=true;
			},
			sel7_8(){
				this.demo7_8 ? this.demo7_7=false : this.demo7_7=true;
			},
			sel7_9(){
				this.demo7_9 ? this.demo7_10=false : this.demo7_10=true;
			},
			sel7_10(){
				this.demo7_10 ? this.demo7_9=false : this.demo7_9=true;
			},
			sel7_11(){
				this.demo7_11 ? this.demo7_12=false : this.demo7_12=true;
			},
			sel7_12(){
				this.demo7_12 ? this.demo7_11=false : this.demo7_11=true;
			},
			//返回
			goBack7(){
				this.switch7_1 = this.switch7_2 = this.switch7_3 = this.switch7_4 = this.switch7_5 = false;
				this.demo7_7 = true;
				this.demo7_8 = false;
				this.input7_4 = '';
				this.selIndex = 0;
			},
			//购买须知保存
			save7_1(){
				if(this.input7_4 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入每人限购多少张'
					})
					return;
				}
				if(this.input7_4 === '0'){
					this.$vux.alert.show({
						title: '提示',
						content: '张数不能少于1'
					})
					return;
				}
				let reg = /[0-9]*[1-9][0-9]*$/;
				if(!reg.test(this.input7_4)){
					this.$vux.alert.show({
						title: '提示',
						content: '张数必须为整数'
					})
					return;
				}
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					user_product_id: getUrlParam('user_product_id') || '',
					par1: this.switch7_1,
					par2: this.switch7_2,
					par3: this.switch7_3,
					par4: this.switch7_4,
					par5: this.switch7_5,
					par6: this.value7_1,
					par7: this.demo7_7
				};
				//console.log(obj);return;
				this.selIndex = 0;
			},
			handleClose8_1(){
				this.selIndex = 4;
			},
			showType8_1(){
				this.shows8_1 = true;
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					user_product_id: getUrlParam('user_product_id') || ''
				};
				this.$axiosGet('/api/group/showgoodscate',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.foodTypeData = res.data;
					}
				})
			},
			sel8_1(id,name){
				this.sel8Index = id;
				this.value8_4 = name;
				this.shows8_1 = false;
			},
			add8_1(){
				this.shows8_2 = true;
			},
			setImg(){
				document.getElementById("upfile2").click();
			},
			setImg0(){
				document.getElementById("upfile0").click();
				document.getElementById("upfile0").click();
			},
			onFileChange2($event){
				let self = this;
				if ($event.target.files.length == 0){
					return ;
				}
				//图片预览fileReader
				let fr = new FileReader();
				fr.readAsDataURL($event.target.files[0]);
				let sImg = document.getElementById('showImg2');
				if($event.target.files.length>0){
					this.$vux.loading.show({
						text: '上传中'
					});
				}
				fr.onload = function(evt){
					sImg.src = evt.target.result;
					let obj = {
						upload: evt.target.result
					};
					//上传base64图片文件
					self.$axiosPost('/utils/files/uploadbase64.json?uid='+getUrlParam('uid')+'&token='+getUrlParam('token'),obj,true).then(res => {
						if(res.code === 200){
							self.$vux.loading.hide();
							self.showImgUrl = res.data.fullpath;
						}
					})
				}
			},
			onFileChange0($event){
				let self = this;
				if ($event.target.files.length == 0){
					return ;
				}
				//图片预览fileReader
				let fr = new FileReader();
				fr.readAsDataURL($event.target.files[0]);
				let sImg = document.getElementById('showImg0');
				if($event.target.files.length>0){
					this.$vux.loading.show({
						text: '上传中'
					});
				}
				fr.onload = function(evt){
					sImg.src = evt.target.result;
					let obj = {
						upload: evt.target.result
					};
					//上传base64图片文件
					self.$axiosPost('/utils/files/uploadbase64.json?uid='+getUrlParam('uid')+'&token='+getUrlParam('token'),obj,true).then(res => {
						if(res.code === 200){
							self.$vux.loading.hide();
							self.showImgUrl0 = res.data.fullpath;
						}
					})
				}
			},
			//商品描述
			goodsDesc(){
				this.selIndex = 9;
			},
			handleClose9_1(){
				this.selIndex = 8;
			},
			save9(){
				if(this.value9_1 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入商品描述'
					})
					return;
				}
				this.value8_8 = this.value9_1;
				this.selIndex = 8;
			},
			onConfirm8_2(value){
				if(value == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入菜品分类'
					})
					return;
				}
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					shop_id: getUrlParam('user_product_id') || '',
					cat_name: value
				};
				this.$axiosPost('/api/group/addgoodscate',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.getMyGoods();
						this.$vux.toast.show({
							text: res.msg
						});
						this.shows8_2 = false;
					}
				})
			},
			saves8_1(){
				if(this.value8_4 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入菜品分类'
					})
					return;
				}
				if(this.value8_2 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入价格'
					})
					return;
				}
				if(this.value8_3 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入数量'
					})
					return;
				}
				if(this.value8_5 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入原价'
					})
					return;
				}
				if(this.value8_6 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入标题'
					})
					return;
				}
				if(this.value8_7 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入简介'
					})
					return;
				}
				if(this.showImgUrl == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请上传图片'
					})
					return;
				}
				if(this.value8_8 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入商品描述'
					})
					return;
				}
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					shop_id: getUrlParam('user_product_id') || '',
					title: this.value8_6,
					summary: this.value8_7,
					face_path: this.showImgUrl,
					introduction: this.value8_8,
					cat_id: this.sel8Index,
					price: this.value8_2,
					original_price: this.value8_5,
					stock: this.value8_3
				};
				//console.log(obj);return;
				this.$axiosPost('/api/group/storeAddgoods',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.$vux.toast.show({
							text: '添加成功',
						});
						this.getMyGoods();
						this.value8_6 = this.value8_4 = this.value8_7 = this.showImgUrl = this.value8_8 = this.value8_2 = this.value8_5 = this.value8_3 = this.value9_1 = '';
						this.sel8Index = 0;
						setTimeout(()=>{
							this.selIndex = 4
						},1000);
					}
				})
			},
			handleClose10_1(){
				this.selIndex = 2;
			},
			save10(){
				if(!this.flagg10){
					return;
				}
				if(this.value10_1 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入开户银行'
					})
					return;
				}
				if(this.value10_2 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入开户姓名'
					})
					return;
				}
				if(this.value10_3 == ''){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入银行卡号'
					})
					return;
				}
				let pattern = /^([1-9]{1})(\d{14}|\d{18})$/;
				if(!pattern.test(this.value10_3)){
					this.$vux.alert.show({
						title: '提示',
						content: '请输入正确的银行卡号'
					})
					return;
				}
				if(this.selStoreId10 === 0){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择所属分店'
					})
					return;
				}
				if(this.selStoreId10_2 === -1){
					this.$vux.alert.show({
						title: '提示',
						content: '请选择付款方式'
					})
					return;
				}
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					},
					user_product_id: getUrlParam('user_product_id') || '',
					bank_of_deposit: this.value10_1,
					account_name: this.value10_2,
					card_num: this.value10_3,
					store_id: this.selStoreId10,
					store_name: this.value10_4,
					method_of_withdrawal: this.selStoreId10_2,
				};
				//console.log(obj);return;
				this.$axiosPost('/api/group/addBankCart',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.flagg10 = false;
						this.$vux.toast.show({
							text: '添加成功'
						});
						this.getAccount();
						setTimeout(()=>{
							this.selIndex = 2;
						},1000);
					}
				})

			},
			showType10_1(){
				this.shows10_1 = true;
				let obj = {
					userinfo: {
						token: getUrlParam('token') || '',
						uid: getUrlParam('uid') || ''
					}
				};
				this.$axiosGet('/api/group/selectstore',{
					data: JSON.stringify(obj)
				}).then(res => {
					if(res.code === 200){
						this.storeData10 = res.data;
					}
				});
			},
			showType10_2(){
				this.shows10_2 = true;
			},
			selStore10(id,name){
				this.selStoreId10 = id;
				this.value10_4 = name;
				this.shows10_1 = false;
			},
			selStore10_2(id,name){
				this.selStoreId10_2 = id;
				this.value10_5 = name;
				this.shows10_2 = false;
			},
			/* 购买须知 */
			formats(val){
				let y = new Date(val).getFullYear();
				let m = new Date(val).getMonth() + 1 >= 10 ? new Date(val).getMonth() + 1 : '0' + (new Date(val).getMonth() + 1);
				let d = new Date(val).getDate() >= 10 ? new Date(val).getDate() : '0' + new Date(val).getDate();
				return y + "-" + m + "-" + d;
			},
			//时、分比较
			hourMinute(val){
				var arr = val.split(':');
				var str = '';
				str += arr.join('');
				return +str;
			},
			//日期比较
			dateCompare(val){
				var arr = val.split('-');
				var str = '';
				str += arr.join('');
				return +str;
			}
		},
		filters: {
			//过滤银行卡
			BankCard(val){
				let reg = /(\d{6})\d{9}(\d{4})/;
				return val.replace(reg,'$1*********$2');
			}
		}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.group_release {
	/* 用餐人数 */
	.demo1-item {
		padding: .1rem .34rem;
		border: 1px solid #e0e0e0;
		color: #08b6a2;
		margin-top: .34rem;
	}
	.demo1-item-selected {
		border: 1px solid #08b6a2;
		background: url('../../assets/images/groups/selected.jpg') no-repeat bottom right;
		background-size: .38rem .29rem;
	}
	.selIndex0{
		.content{
			background: #fff;
			padding-top: .24rem;
			.upload_imgs {
				width: 6.9rem;	
				min-height: 3.8rem;	
				padding: 1rem 0;						
				margin: 0 auto;
				border: 1px dashed #b3b3b3;
				display: flex;
				flex-flow: wrap;				
				align-items: center;
				justify-content: space-around;
				position: relative;
				.showImg2{
					width:1.54rem;
					height:1.54rem
				}
				#showImg {					
					width: 1.54rem;
					height: 1.54rem;
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%,-50%);
				}
			}
			.sel_type {
				text-align: left;
				.rates {
					padding: 10px 15px;
					display: flex;
					align-items: center;
					p {
						font-size: .34rem;
						color: #131313;
					}
					img {
						width: .31rem;
						height: .32rem;
						margin-left: .08rem;
					}
					input{
						border: none;
						font-size: .34rem;
						color: #131313;
						width: 55%;						
						margin-left: .54rem;						
					}
				}
				.meal_names {
					border-top: .16rem solid #f0f0f0;
					padding: 10px 15px;
					display: flex;
					align-items: center;
					border-bottom: 1px solid #f0f0f0;
					>div {
						display: flex;
						align-items: center;
						width: 1.8rem;
						p {
							font-size: .34rem;
							color: #131313;
							white-space: nowrap;
						}
						img {
							width: .31rem;
							height: .32rem;
							margin-left: .08rem;
						}
					}
					input {
						width: 68%;
						border: none;
						font-size: .34rem;
						color: #131313;
					}
					>img {
						width: .22rem;
						height: .22rem;
					}
				}
				.meal_quantity {
					padding: 10px 15px;
					border-bottom: 1px solid #f0f0f0;
					div {
						display: flex;
						h6 {
							font-size: .34rem;
							color: #131313;
							font-weight: 400;
						}
						h6:nth-of-type(2) {
							margin-left: .48rem;
						}
					}
				}
				.meal_content,
				.meal_type,
				.consume_time,
				.end_time {
					border-bottom: 1px solid #f0f0f0;
				}
				.end_time{
					border-top: .16rem solid #f0f0f0;
				}
				.group_prices {
					border-top: none;
				}
				.foot_button{
					background: #f0f0f0;
					display: flex;
					justify-content: center;
					padding: .28rem .26rem .5rem .26rem;
					button{
						border: none;
						border-radius: .05rem;
						width: 6.9rem;
						height: .72rem;
						line-height: .72rem;
						background: #ff9d3c;
						font-size: .32rem;
						color: #fff;
					}
				}
				.set_img0{
					height: .88rem;
					display: flex;
					align-items: center;
					justify-content: space-between;
					padding: 0 .3rem;
					border-top: 1px solid #D9D9D9;
					p{
						font-size: .34rem;
						color: #525253;
					}
					img{
						width: .65rem;
						height: .65rem;
					}
				}
			}
		}
	}
	.selIndex1{
		.select_type {
			overflow: hidden;
			.content {
				text-align: left;
				.all_class {
					overflow: auto;
					display: flex;
					.first_class {
						width: 3.2rem;
						background: #f0f0f0;
						overflow: auto;
						padding-bottom: 1.5rem;
						ul {
							font-size: .28rem;
							color: #363636;
							list-style: none;
							li {
								height: .8rem;
								line-height: .8rem;
								padding-left: .26rem;
							}
						}
						.sel1 {
							background: #fff;
							color: #41c8b8;
						}
					}
					.second_class {
						width: 4.3rem;
						background: #fff;
						position: relative;
						ul {
							font-size: .28rem;
							color: #3f3f3f;
							list-style: none;
							li {
								height: .8rem;
								line-height: .8rem;
								border-bottom: 1px solid #f2f2f2;
								padding-left: .28rem;
							}
						}
						p{
							margin-top: 2rem;
							text-align: center;
							font-size: .28rem;
							color: #666;
							white-space: nowrap;
						}
						.sel2 {
							background: #40E0D0;
							color: #fff;
						}
					}
				}
			}
		}
	}
	.selIndex2{
		.accounts {
			.cons{
				padding-bottom: 2rem;
			}
			.content1,.content2 {
				background: #fff;
				text-align: left;
				.data_list {
					margin-top: .18rem;
					padding: .26rem;
					border-bottom: 1px solid #f0f0f1;
					.names {
						display: flex;
						justify-content: space-between;
						p {
							font-size: .32rem;
							color: #1f1f1f;
						}
					}
					h6 {
						font-size: .22rem;
						color: #0a0a0a;
						font-weight: 400;
						margin: .18rem 0 .2rem 0;
					}
					.name1 {
						display: flex;
						p {
							font-size: .26rem;
							color: #545454;
							margin-top: .14rem;
						}
						p:nth-of-type(1) {
							width: 1.6rem;					
						}
					}
				}
			}
			.content2 {
				.no_data {
					position: absolute;
					left: 50%;
					top: 50%;
					transform: translate(-50%, -50%);
					color: #A9A9A9;
				}
			}				
		}
		.btns2{
			width: 100%;
			height: 1.12rem;
			position: fixed;
			bottom: 0;
			left: 50%;
			transform: translateX(-50%);
			display: flex;
			justify-content: space-around;
			align-items: center;
			background: #fff;
			z-index: 99;
			border-top: 1px solid #e5e5e5;
			button{
				border: none;
				border-radius: .05rem;
				width: 3rem;
				height: .72rem;
				line-height: .72rem;
				text-align: center;
				background: #ff9d3c;
				font-size: .32rem;
				color: #fff;
			}
		}
	}
	.selIndex3{
		.stores {
			.content {
				text-align: left;			
				>h6{
					font-size: .24rem;
					color: #535353;
					font-weight: 400;
					background: #ccc;
					padding: .1rem .26rem;
				}
				.data_lists{
					display: flex;
					align-items: center;
					padding: .24rem .28rem;
					background: #fff;
					margin-bottom: .1rem;
					.store_info{
						margin-left: .28rem;
						h6{
							font-size: .28rem;
							color: #484848;
							font-weight: 400;
							margin-bottom: .2rem;
						}
						p{
							font-size: .27rem;
							color: #898989;
						}
					}
				}
				.no_more{
					text-align: center;
					font-size: .22rem;
					color: #919191;
					padding: .22rem 0;
				}
				button{
					border: none;
					border-radius: .05rem;
					position: fixed;
					bottom: .2rem;
					left: 50%;
					transform: translateX(-50%);
					width: 6.9rem;
					height: .72rem;
					line-height: .72rem;
					text-align: center;
					background: #ff9d3c;
					font-size: .32rem;
					color: #fff;
				}
			}
		}
	}
	.selIndex4{
		.meal_content {
			.content {
				.content1 {
					.no_data {
						img:nth-of-type(1) {
							width: 7.5rem;
							height: 1.2rem;
						}
						img:nth-of-type(2) {
							width: 1.43rem;
							height: 2.09rem;
							position: absolute;
							top: 50%;
							left: 50%;
							transform: translate(-50%, -50%);
						}
					}
					.have_datas {
						background: #fff;
						display: flex;
						flex-direction: column;
						.single_meal {
							display: flex;
							justify-content: space-between;
							align-items: center;
							padding: .24rem .28rem;
							border-top: .22rem solid #f0f0f0;
							border-bottom: 1px solid #e0e0e0;
							>p {
								font-size: .3rem;
								color: #333;
							}
							>div {
								display: flex;
								align-items: center;
								img:nth-of-type(1) {
									width: .31rem;
									height: .32rem;
								}
								span {
									font-size: .28rem;
									color: #04b5a1;
									margin: 0 .1rem;
								}
								p{
									width: .15rem;
									height: .15rem;
									border-top: 1px solid #04b5a1;
									border-right: 1px solid #04b5a1;
									transform: rotate(45deg);
								}
							}
						}
						.data_lists {
							.data_list {								
								display: flex;								
								align-items: center;
								border-bottom: 1px solid #e0e0e0;
								overflow: hidden;
								padding: .1rem .2rem;								
								>p:nth-of-type(1) {									
									text-align: left;
									font-size: .3rem;
									color: #464646;
									flex: 1;
								}
								>p:nth-of-type(2) {
									font-size: .26rem;
									color: #f54100;
									margin: 0 .15rem 0 .1rem;									
								}
								.change_num{
									display: flex;
									align-items: center;
									img{
										width: .38rem;
										height: .38rem;
									}
									p{
										font-size: .3rem;
										color: #000;
										margin: 0 .18rem;
									}
								}
							}
							.blank4{
								height: 3rem;
								background: #efefef;
							}
						}
						.footers1 {
							width: 7.5rem;
							height: 1.7rem;
							position: fixed;
							bottom: 0;
							left: 0;
							background: #fff;
							border-top: 1px solid #dadada;
							p {
								width: 6.9rem;
								margin: .22rem auto;
								text-align: left;
								font-size: .26rem;
								color: #1c1c1c;
								span {
									color: #f64700;
								}
							}
							button {
								width: 6.9rem;
								height: .76rem;
								line-height: .76rem;
								margin: 0 auto;
								border: none;
								border-radius: .05rem;
								background: #ff9d3c;
								font-size: .34rem;
								color: #fff;
							}
						}
						.all_use {
							height: 2.52rem;
							text-align: left;
							background: #fff;
							p {
								height: .84rem;
								line-height: .84rem;
								font-size: .3rem;
								color: #2c2c2c;
								padding: 0 .26rem;
								border-bottom: 1px solid #e3e3e3;
							}
							.selects {
								color: #05b5a1;
								background: url('../../assets/images/groups/sel_store.jpg') no-repeat 7rem .31rem;
								background-size: .28rem .22rem;
							}
						}
					}
				}
				.content2 {
					.all_foods {
						display: flex;
						.first_class {
							width: 1.6rem;
							overflow: auto;
							background: #f7f7f7;
							padding-bottom: 1.5rem;
							p {
								height: 1rem;
								line-height: 1rem;
								font-size: .28rem;
								color: #444;
								position: relative;
							}
							.sels {
								background: #fff;
								color: #11b9a5;
							}
						}
						.second_class {
							align-self: flex-start;
							width: 5.9rem;						
							background: #fff;
							padding-bottom: 3rem;
							.second_lists {
								display: flex;
								justify-content: space-between;
								align-items: center;								
								margin: 0 .28rem;
								border-bottom: 1px solid #e5e5e5;							
								overflow: hidden;
								text-align: left;
								padding: .2rem 0;
								.food_img {
									img {
										width: .98rem;
										height: .98rem;
									}
								}
								.food_info {
									flex: 1;
									padding: 0 .1rem;
									height: .98rem;
									h6{																				
										font-size: .3rem;
										color: #161616;
										font-weight: 400;
										display: -webkit-box;
										overflow: hidden;
										text-overflow: ellipsis;
										-webkit-line-clamp: 2;
										-webkit-box-orient: vertical;
									}
									p{
										font-size: .26rem;
										color: #747474;
										margin-top: .05rem;
										span{
											color: #f7530c;
										}
									}
								}
								.change_num{
									display: flex;
									align-items: center;
									img{
										width: .38rem;
										height: .38rem;
									}
									p{
										font-size: .3rem;
										color: #000;
										margin: 0 .18rem;
									}
								}
							}
						}
						.no_d{
							width: 5.9rem;
							line-height: 5rem;
							display: flex;
							justify-content: center;
							font-size: .28rem;
							color: #666;
						}
					}
					.footers2{
						width: 7.5rem;
						height: 1.7rem;
						background: #fff;
						position: fixed;
						bottom: 0;
						left: 0;
						border-top: 1px solid #dbdbdb;
						text-align: left;
						p{
							width: 7rem;
							margin: .22rem auto;
							font-size: .28rem;
							color: #050505;
							span{
								color: #f64500;
							}
						}
						>div{
							width: 7rem;
							margin: 0 auto;
							display: flex;
							justify-content: space-between;
							align-items: center;
							button{
								border: none;
								width: 3.3rem;
								height: .76rem;
								line-height: .76rem;
								border-radius: .05rem;
								font-size: .32rem;
							}
							button:nth-of-type(1){
								background: #f0f0f0;
								color: #262626;
								font-weight: 700;
							}
							button:nth-of-type(2){
								background: #3dc6b6;
								color: #fff;
							}
						}
					}
				}
			}
		}
	}
	/* 用餐类型 */
	.all_types,.all_times {
		width: 7.5rem;
		background: #fff;
		text-align: left;			
		.btn {
			height: 1rem;
			font-size: .3rem;
			color: #22beac;
			border-top: .16rem solid #909090;
			text-align: center;
			line-height: .84rem;
		}
	}
	.all_times{
		height: 5rem;
		overflow: auto;
	}
	.selIndex5{
		.consume_time {
			.content {
				background: #fff;
				.check_list {
					text-align: left;
					border-bottom: 1px solid #D9D9D9;
				}
				.date_time {
					.time_list{
						display: flex;
						justify-content: center;
						align-items: center;
						border-bottom: 1px solid #D9D9D9;
						padding: .14rem 0;
					}
					a{
						text-decoration: none!important;
					}
					img {
						width: .41rem;
						height: .4rem;
					}
				}
				.adds {
					display: flex;
					align-items: center;
					padding: .18rem .64rem;
					img {
						width: .41rem;
						height: .41rem;
						margin-right: .34rem;
					}
					p{
						font-size: .3rem;
						color: #14baa6;
					}
				}
				.errors{
					display: flex;
					align-items: center;
					background: #efefef;
					padding: .08rem .28rem;
					img {
						width: .28rem;
						height: .28rem;
						margin-right: .34rem;
					}
					p{
						font-size: .24rem;
						color: #f64406;
					}
				}
				button {
					border: none;
					border-radius: .05rem;
					width: 6.9rem;
					height: .72rem;
					position: fixed;
					left: 50%;
					transform: translateX(-50%);
					bottom: .1rem;
					background: #ff9d3c;
					font-size: .3rem;
					color: #fff;
				}
			}
		}
	}
	.selIndex6{
		.content>img{
			display: none!important;
		}
		.appoint_date {
			.errors{
				display: flex;
				align-items: center;
				background: #efefef;
				padding: .08rem .28rem;
				img {
					width: .28rem;
					height: .28rem;
					margin-right: .34rem;
				}
				p{
					font-size: .24rem;
					color: #f64406;
				}
			}
			.content {
				background: #fff;
				>img{
					display: none!important;
				}
				.date_time {
					.time_list{
						display: flex;
						justify-content: center;
						align-items: center;
						border-bottom: 1px solid #D9D9D9;
						padding: .14rem 0;
					}
					a{
						text-decoration: none!important;
					}
					img {
						width: .41rem;
						height: .4rem;
						margin-right: .2rem;
					}
				}
				.adds {
					display: flex;
					align-items: center;
					padding: .18rem .3rem;
					img {
						width: .41rem;
						height: .41rem;
						margin-right: .34rem;
					}
					p{
						font-size: .3rem;
						color: #14baa6;
					}
				}
			}
			button{
				border: none;
				border-radius: .05rem;
				width: 6.9rem;
				height: .72rem;
				line-height: .72rem;
				background: #ff9d3c;
				font-size: .3rem;
				color: #fff;
				position: absolute;
				bottom: .1rem;
				left: 50%;
				transform: translateX(-50%);
			}
		}
	}
	.selIndex7{
		padding-bottom: 1rem;
		.purchase_notice1 {
			.content {
				text-align: left;
				background: #fff;
				h6{
					padding: .16rem .28rem;
					background: #f8f8f8;
					font-size: .25rem;
					color: #8e8e8e;
					font-weight: 400;
				}			
			}
			footer{
				padding: .38rem .26rem .1rem .26rem;
				background: #f0f0f0;
				button{
					position: fixed;
					left: 50%;
					bottom: .2rem;
					transform: translateX(-50%);
					border: none;
					border-radius: .05rem;
					width: 6.9rem;
					height: .72rem;
					line-height: .72rem;
					background: #ff9d3c;
					font-size: .32rem;
					color: #fff;								
				}
			}
			.all_types {
				width: 7.5rem;
				background: #fff;
				text-align: left;			
				.btn {
					height: 1rem;
					font-size: .3rem;
					color: #22beac;
					border-top: .16rem solid #909090;
					text-align: center;
					line-height: .84rem;
				}
			}
			.all_times{
				height: 4.8rem;
				overflow: auto;
			}
		}
	}
	.selIndex8{
		z-index: 150;
		background: #fff;
		text-align: left;
		.add-food{
			.set_img{
				height: .88rem;
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0 .3rem;
				border-bottom: 1px solid #D9D9D9;
				p{
					font-size: .34rem;
					color: #525253;
				}
				img{
					width: .65rem;
					height: .65rem;
				}
			}
			.goods_desc{
				height: .88rem;
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 0 .3rem;
				p{
					font-size: .34rem;
					color: #525253;
				}
				input{
					width: 70%;
					height: 100%;
					border: none;
					outline: none;
					text-overflow: ellipsis;
					padding: 0 .1rem;
					text-align: right;
					font-size: .34rem;
					&::placeholder{
						font-size: .34rem;
						text-align: right;
					}
				}
				span{
					display: block;
					width: .2rem;
					height: .2rem;
					border-top: 2px solid #C8C8CD;
					border-right: 2px solid #C8C8CD;
					transform: rotate(45deg);
				}
			}
		}
		.food_list8{
			background: #fff;
			p{
				height: .8rem;
				line-height: .8rem;
				font-size: .3rem;
				color: #666;
				border-bottom: 1px solid #e5e5e5;
				padding: 0 .1rem;
			}
			.sel{
				background: #40E0D0;
				color: #fff;
			}
		}
		.header{
			position: relative;
			height: .92rem;
			line-height: .92rem;
			width: 100%;
			text-align: center;
			.back-icon{
				position: absolute;
				left: 0;
				top: 0;
				padding: 0 .2rem;
			}
		}
		.confirm-btn{
			width: 100%;
			position: fixed;
			bottom: .2rem;
			left: 50%;
			transform: translateX(-50%);
			display: flex;
			justify-content: space-around;
			button{
				border: none;
				width: 3rem;
				height: .8rem;
				line-height: .8rem;
				text-align: center;
				font-size: .32rem;
				color: #fff;
				border-radius: .1rem;
				background: #3dc6b6;
			}
		}
		.foot_type_list{
			background: #fff;
			z-index: 999999;
			p{
				height: 1rem;
				line-height: 1rem;
				font-size: .3rem;
				color: #000;
				background: #fff;
			}
		}
	}
	.selIndex9{
		background: #fff;
		min-height: 100%;
		.header{
			position: relative;
			height: .92rem;
			line-height: .92rem;
			width: 100%;
			text-align: center;
			.back-icon{
				position: absolute;
				left: 0;
				top: 0;
				padding: 0 .2rem;
			}
		}
		.btns9{
			width: 100%;
			position: fixed;
			bottom: .5rem;
			left: 50%;
			transform: translateX(-50%);
			display: flex;
			justify-content: space-around;
			button{
				border: none;
				border-radius: .05rem;
				width: 3rem;
				height: .72rem;
				line-height: .72rem;
				text-align: center;
				background: #06c1af;
				font-size: .32rem;
				color: #fff;
			}
		}
	}
	.selIndex10{
		background: #fff;
		.header{
			position: relative;
			height: .92rem;
			line-height: .92rem;
			width: 100%;
			text-align: center;
			.back-icon{
				position: absolute;
				left: 0;
				top: 0;
				padding: 0 .2rem;
			}
		}
		.btns10{
			width: 100%;
			position: fixed;
			bottom: .2rem;
			left: 50%;
			transform: translateX(-50%);
			button{
				border: none;
				border-radius: .05rem;
				width: 6.9rem;
				height: .72rem;
				line-height: .72rem;
				background: #ff9d3c;
				font-size: .32rem;
				color: #fff;
			}
		}
		.store_list10,.way_list10{
			background: #fff;
			p{
				height: .8rem;
				line-height: .8rem;
				font-size: .3rem;
				color: #666;
				border-bottom: 1px solid #e5e5e5;
				padding: 0 .1rem;
			}
			.sel{
				background: #40E0D0;
				color: #fff;
			}
		}
	}
}
</style>